#!/bin/bash
# 未修改，测试仅做参考

REDIS_BIN='/apps/svr/redis/bin'
REDIS_MASTER_HOST='127.0.0.1'
REDIS_MASTER_PORT=6379
 
ALIVE=`$REDIS_BIN/redis-cli -h $REDIS_MASTER_HOST -p $REDIS_MASTER_PORT  PING`
 
if [ "$ALIVE" == "PONG" ]; then
  echo $ALIVE
  exit 0 
else
  echo $ALIVE
  exit 1 
fi